package com.stu.design_patterns.factory._03_abstract_factory;

// 汽车制造厂
public interface CarFactory {
  Engine getEngine();
  Seat getSeat();
  Tyre getTyre();
}

// 高端汽车制造厂
class LuxuryCarFactory implements CarFactory {
  @Override
  public Engine getEngine() { return new LuxuryEngine(); }
  @Override
  public Seat getSeat() { return new LuxurySeat(); }
  @Override
  public Tyre getTyre() { return new LuxuryTyre(); }
}

// 低端汽车制造厂
class LowCarFactory implements CarFactory {
  @Override
  public Engine getEngine() { return new LowEngine(); }
  @Override
  public Seat getSeat() { return new LowSeat(); }
  @Override
  public Tyre getTyre() { return new LowTyre(); }
}